feat: add findConjunctions() utility to conjunction module in @observerly/astrometry - #389
Merged
Merged
Conversation
michealroberts
force-pushed
the
feature/conjunction/findConjunctions
branch
2 times, most recently
from
November 10, 2024 14:51
0839756 to
2fac1fe
Compare
michealroberts
force-pushed
the
feature/conjunction/findConjunctions
branch
from
August 18, 2026 20:34
2fac1fe to
c0f3721
Compare
michealroberts
force-pushed
the
feature/conjunction/findConjunctions
branch
from
August 18, 2026 20:38
c0f3721 to
e77771e
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a new findConjunctions() utility to the astrometry conjunction module, expanding conjunction searches beyond planets to include the Moon and two bright near-ecliptic stars (Spica and Regulus), with corresponding tests validating behavior like midpoint calculation and star precession.
Changes:
- Add
findConjunctions()to compute closest conjunctions per target-pair across an interval, including Moon + (Spica, Regulus) with star precession applied. - Add Vitest coverage for
findConjunctions()behavior (pair-keying, midpoint correctness across RA=0, precession, and invalid step handling).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/conjunction.spec.ts | Adds test coverage for the new findConjunctions() API and its expected behaviors. |
| src/conjunction.ts | Implements findConjunctions() and adds Moon + star targets (with precession) into the conjunction search loop. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
michealroberts
force-pushed
the
feature/conjunction/findConjunctions
branch
from
August 18, 2026 20:41
e77771e to
519c2b1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/conjunction.ts:499
- Inline ESLint configuration (
/*eslint prefer-const: ...*/) inside the function is unusual and affects linting beyond this block. It’s not needed here; definingfrom/toexplicitly avoids the rule interaction and keeps lint configuration centralized.
/*eslint prefer-const: ["error", {"destructuring": "all"}]*/
let { from, to } = interval
src/conjunction.ts:476
- The JSDoc lists
horizon,angularSeparationThreshold, andstepMinutesas standalone parameters, but the function actually accepts a singleparamsobject. Also,angularSeparationThresholdis used as a maximum separation (seeisConjunction()), so documenting it as a “minimum” is misleading.
* @param interval - The interval to search for the initial conjunction.
* @param observer - The geographic coordinate of the observer.
* @param horizon - The minimum altitude of the targets above the horizon.
* @param angularSeparationThreshold - The minimum angular separation for conjunction.
* @param stepMinutes - The step size in minutes for checking conjunction.
michealroberts
force-pushed
the
feature/conjunction/findConjunctions
branch
from
August 18, 2026 20:51
519c2b1 to
baf631d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add findConjunctions() utility to conjunction module in @observerly/astrometry